import { onMounted, ref } from 'vue'
import { getInfo } from '../../api/house'
// 获取所有分类 
export const useHouseAllList = () => {
  const houseList = ref([])
  // 定义方法
  const useHouseAllList = async () => {
    let res = await getInfo()
    // console.log(res);
    houseList.value = res.data
    // console.log(houseList);
  }
  onMounted(() => {
    useHouseAllList()
  })
  return houseList
}
export const houseTable = [
  { value: 'community.name', label: '小区名称' },
  { value: 'building.name', label: '栋数' },
  { value: 'unit', label: '单元数' },
  { value: 'floor', label: '楼层' },
  { value: 'code', label: '房产编号' },
  { value: 'name', label: '房产名称' },
  { value: 'owner_name', label: '户主姓名 ' },
  { value: 'owner_tel', label: '联系方式' },
  { value: 'rooms', label: '房间数' },
  { value: 'desc', label: '测试' },
  { value: 'enter_time', label: '入住时间' },
]